package com.wy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.sun.org.apache.xpath.internal.operations.Bool;
import com.wy.dto.GoodsAuctionDto;
import com.wy.entity.GoodsAuction;
import com.wy.entity.GoodsInfo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:王渝
 * @Date: 2022/11/30  11:06
 * @Version 1.0
 */
public interface GoodsAuctionService extends IService<GoodsAuction> {

    /**
     * 参与出价
     * @param goodsAuction 出价信息
     * @param isParticipate 是否出过价
     * @return
     */
    boolean participateAuction(GoodsAuction goodsAuction,boolean isParticipate);




    /**
     * 根据状态分页查询
     * @param currentPage 当前页
     * @param pageSize 一页的数量
     * @param userId 用户id
     * @param isEnd 是否结束
     * @return
     */
    PageInfo<GoodsAuctionDto> queryPageByUserId(int currentPage, int pageSize,  Long userId, Boolean isEnd);

    /**
     * 查询商品的出价记录
     * @param goodsId 商品id
     * @return
     */
    List<GoodsAuction> queryListByGoodsId(Long goodsId);
}
